#ifndef ROW_H
#define ROW_H

#include "RowNode.h"
#include <iostream>
#include <cstring>
#include <cmath>
#include <cstdio>
#include <cstdlib>

using namespace std;

#define MAXLENGTH 512

class Row
{
private:
	char text[MAXLENGTH];
	int color[MAXLENGTH];
	int length;
	int tabcount;
	class RowNode* point;
public:
	Row(class RowNode &p) {
		memset(text,'\0',MAXLENGTH);
		memset(color,'\0',MAXLENGTH);
		length = 0;
		tabcount = 0;
		point = p;
		p.SetRow(this); 
	}
	~Row();
	void InsertText(int x, int y, char temp);
	void DeleteText(int x, int y);
	inline void SetTabCount(int n) { tabcount = n; }
	inline int GetLength() { return length; }
	inline int GetText(int n) { return text[n]; }
	inline int GetColor(int n) { return color[n]; }
	inline int GetTabCount() { return tabcount; }
	inline class RodeNode* PointRowNode() { return this->pointrow;}
};

#endif
